From c9c67d5a0288890dba450537eeeae420d9096062 Mon Sep 17 00:00:00 2001 From: "Ian.Campbell@xensource.com" Date: Tue, 13 Jun 2006 10:14:20 +0100 Subject: [PATCH] [LINUX] Correctly return the results of {event_channel_op,physdev_op}_compat Signed-off-by: Ian Campbell --- linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypercall.h | 2 ++ .../include/asm-x86_64/mach-xen/asm/hypercall.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypercall.h b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypercall.h index 767d293184..7de10137f1 100644 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypercall.h +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypercall.h @@ -255,6 +255,7 @@ HYPERVISOR_event_channel_op( op.cmd = cmd; memcpy(&op.u, arg, sizeof(op.u)); rc = _hypercall1(int, event_channel_op_compat, &op); + memcpy(arg, &op.u, sizeof(op.u)); } return rc; } @@ -290,6 +291,7 @@ HYPERVISOR_physdev_op( op.cmd = cmd; memcpy(&op.u, arg, sizeof(op.u)); rc = _hypercall1(int, physdev_op_compat, &op); + memcpy(arg, &op.u, sizeof(op.u)); } return rc; } diff --git a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/hypercall.h b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/hypercall.h index 12d18d39df..1bcc7901ea 100644 --- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/hypercall.h +++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/hypercall.h @@ -253,6 +253,7 @@ HYPERVISOR_event_channel_op( op.cmd = cmd; memcpy(&op.u, arg, sizeof(op.u)); rc = _hypercall1(int, event_channel_op_compat, &op); + memcpy(arg, &op.u, sizeof(op.u)); } return rc; } @@ -288,6 +289,7 @@ HYPERVISOR_physdev_op( op.cmd = cmd; memcpy(&op.u, arg, sizeof(op.u)); rc = _hypercall1(int, physdev_op_compat, &op); + memcpy(arg, &op.u, sizeof(op.u)); } return rc; } -- 2.30.2